 <meta charset="utf-8">
<div class="box box-primary" id="app_authRole_edit">
            <div class="box-header with-border">
              <h3 class="box-title">用户信息编辑</h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form role="form" id="commentForm">
              <div class="box-body">
              
                <div class="form-group">
                  <label for="userName">用户名称</label>
                  <input type="text" name="userName" v-model="userName" class="form-control" id="userName" placeholder="请输入用户名称"  required aria-required="true" >
                </div>
                
                <div class="form-group">
                  <label for="nickName">用户昵称</label>
                  <input type="text" name="nickName"   v-model="nickName"  class="form-control" id="nickName" placeholder="请输入用户昵称" required>
                </div>
                  <div class="form-group">
                  <label for="password">用户密码</label>
                  <input type="text" name="password"   v-model="password"  class="form-control" id="password" placeholder="请输入用户密码" required>
                </div>
                
                <div class="form-group">
                  <label for="enabled" >是否启用</label>
                  <select class="form-control" v-model="enabled" id="enabled" name="enabled" required >
                    <option value="">请选择</option>
                    <option value="1">启用</option>
                    <option value="0">禁用</option>
                  </select>
                </div>
                
                    <div class="form-group">
                  <label for="accountExpired" >账户是否过期</label>
                  <select class="form-control" v-model="accountExpired" id="accountExpired" name="accountExpired" required >
                    <option value="">请选择</option>
                    <option value="1">是</option>
                    <option value="0">否</option>
                  </select>
                </div>
                
                 
                      <div class="form-group">
                  <label for="accountLocked" >账户是否锁定</label>
                  <select class="form-control" v-model="accountLocked" id="accountLocked" name="accountLocked" required >
                    <option value="">请选择</option>
                    <option value="true">是</option>
                    <option value="false">否</option>
                  </select>
                </div>
                         <div class="form-group">
                  <label for="defaultRole" >默认角色</label>
                  <select class="form-control" v-model="defaultRole" id="defaultRole" name="defaultRole" required >
                    <option value="">请选择</option>
                    <option value="1">admin</option>
                    <option value="0">其他</option>
                  </select>
                </div>
               <div class="form-group">
                  <label for="description">描述</label>
                  <input type="text" name="description"   v-model="description"  class="form-control" id="description" placeholder="用户描述" required>
                </div>
              </div>
              <!-- /.box-body -->
              <div class="box-footer">
                 <button type="button" class="btn btn-default" v-on:click="cancle">取消</button>
                 <button type="button" class="btn btn-info pull-right"  v-on:click="reverseMessage">提交</button>
              </div>
            </form>

<script type="text/javascript">

var foramdata=  {
		userName:'',
		nickName:'',
		password:'',
		enabled:'',
		accountExpired:'',
		accountLocked:'',
		defaultRole:'',
	   description: '',
	   credentialsExpired:'1',
		   salt:'118435661998846DaESnD3bi8KbhVUPwUwr9D'
 };

var vm = new Vue({
        el: '#app_authRole_edit',
        data: foramdata,
         methods: {
        	    reverseMessage: function () {
        	    	if($("#commentForm").valid()){
        	    		var url="http://localhost:8082/zht-framees-auth-shiro-server/sys/auth/authUser/addUser";
        	    		zfesAjax.ajaxTodo(url,foramdata, function(data){
        	    			alertSwal.successText(data.message);
        	    			 layer.close(layer.index);
        	    		})
        	    	}
        	    },
        	    cancle:function(){
        	    	 layer.close(layer.index);
        	    	 
        	    }
        }
    })

 </script>
</div>